
#include<stdio.h>
#include<string.h>
#ifndef _INTERFACE_H
#define _INTERFACE_H

#define ultrasonic_dev           	 //超声波驱动名
#define buzzer_dev             		 //蜂鸣器驱动名
#define adc_dev			 	      //ADC驱动名
#define photosensor_dev			 //光敏传感驱动名
#define led_dev			  	 //LED驱动名
#define key1_dev
#define key2_dev               		 //按键驱动名  

#define  CMD_BASE 'h'
#define  BUZZ_L  _IOW(CMD_BASE,100,int)   //蜂鸣器响起IOCTL
#define  BUZZ_D  _IOW(CMD_BASE,400,int)   //蜂鸣器不响IOCTL
#define  LED_L   _IOW(CMD_BASE,100,int)   //LED亮起IOCTL
#define  LED_D   _IOW(CMD_BASE,400,int)   //LED熄灭IOCTL
#define  ADC_L  _IOW(CMD_BASE,100,int)    //ADC 开始工作
#define  LIGHT_L  _IOW(CMD_BASE,100,int)  //光敏传感器 开始工作

void delay(int);
void obstacle_avoidance();
void set_buzzer();